package cn.edu.ecust.seckill.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.Arrays;
import java.util.List;

@Configuration
@EnableScheduling
public class SchedulerConfig {

    @Bean
    public List<TaskQueue> taskQueueList() {
        TaskQueue[] taskQueues = new TaskQueue[10];
        for (int i = 0; i < 10; i++) {
            taskQueues[i] = new TaskQueue(1000);
        }
        return Arrays.asList(taskQueues);
    }

}
